package cn.com.vs.model;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class GeneralJSONResult {
	
	private JSONObject result = new JSONObject();
	
	public GeneralJSONResult(){
		result.put("ok", false);
	}
	
	public String getMessage() {
		return result.getString("message");
	}
	public void setMessage(String message) {
		result.put("message", message);
	}
	public boolean isOk() {
		return result.getBooleanValue("ok");
	}
	public void setOk(boolean ok) {
		result.put("ok", ok);
	}
	
	public void setData(JSON obj){
		result.put("data", obj);
	}
	
	public JSON getData(){
		return (JSON) result.get("data");
	}
	
	public String toString(){
		return result.toJSONString();
	}
}
